package com.reny.ll.git.mvvm

import android.widget.Space
import androidx.annotation.DimenRes
import com.alibaba.android.vlayout.layout.SingleLayoutHelper
import com.reny.ll.git.mvvm.extras.getRDimen
import com.reny.ll.git.mvvm.recycler.BaseDelegateAdapter
import com.reny.ll.git.mvvm.recycler.BaseViewHolder

//空白空间
class AutoSpaceAdapter(@DimenRes val spaceDimen:Int = R.dimen.space_height) : BaseDelegateAdapter<String>(
    SingleLayoutHelper(),
    R.layout.layout_auto_view_space,
    1
) {
    override fun convert(holder: BaseViewHolder, item: String?, position: Int) {
        holder.getView<Space>(R.id.space).layoutParams.height = getRDimen(spaceDimen).toInt()
    }
}